EXEC = client service
COMPILE = g++
CFLAGS = -c -I.

XMLRPC_C_CONFIG = ../xmlrpc-c-config.test
INCLUDES = -I../include/
SERVER_LIB = $(shell $(XMLRPC_C_CONFIG) c++2 abyss-server --libs)
CLIENT_LIB = $(shell $(XMLRPC_C_CONFIG) c++2 client --libs)

all: client service

client: client.o
	$(COMPILE) -o client $(CLIENT_LIB) client.o 
	
service: service.o
	$(COMPILE) -o service $(SERVER_LIB) service.o 
	
client.o: client.cpp
	$(COMPILE) $(CFLAGS) $(INCLUDES) client.cpp
	
service.o: service.cpp 
	$(COMPILE) $(CFLAGS) $(INCLUDES) service.cpp
	
clean:
	\rm *.o $(EXEC)
	
tar:
	tar cfv project3.tar client.cpp service.cpp